<template>
    <div style="display:none">
        <button v-print="print">打印</button>
        <div id="printArea">
            <div class="printPage" v-for="(item,index) in mouldInfo" :key="index">
                <img :src="$global.uploadUrl + item.qr" alt="" style="width:90px">
                <p>{{item.name}}</p>
                <p>{{item.code}}</p>
            </div>
        </div>
    </div>
</template>

<script>
    import print from '@/utils/print.js'
    export default {
        data() {
            return {
                print,
            }
        },
        props: {
            mouldInfo: {
                type: Array,
                default: () => []
            }
        },
        methods: {
           
        }
    }
</script>

<style lang="less" scoped>
    #printArea {
        height: 100%;
        padding-left: 10px;
        p{
            font-size: 12px;
            color: #000;
        }
    }

    @media print {
        .printPage {
            height: 100%;
        }
    }
</style>